//package Model;
//
//import java.sql.Connection;
//import java.sql.DriverManager;
//import java.sql.PreparedStatement;
//import java.sql.ResultSet;
//import java.sql.SQLException;
//
//public class DB {
//	
//		private static String userName = "_445team19";
//		private static String password = "Fuphif";
//		private static String serverName = "jdbc:mysql://cssgate.insttech.washington.edu/_445team19";
//		private static Connection conn;
//
//        public static Connection getConnection() throws Exception {
//                Class.forName("com.mysql.jdbc.Driver");
//                conn = DriverManager.getConnection(serverName, userName, password);
//                conn.setAutoCommit(false);
//        		System.out.println("Connected to database");                
//                return conn;
//        }
//
//        public static void closeConnection(PreparedStatement statement,
//                        ResultSet results) throws Exception {
//                if (statement != null) {
//                        statement.close();
//                        statement = null;
//                }
//                if (results != null) {
//                        results.close();
//                        results = null;
//                }
//                if (conn != null) {
//                	conn.close();
//                	conn = null;
//                }
//        }
//
//        
//}
